package com.glaway.car.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "car.jwt")
public class JwtProperties {
    private String secretKey;
    private long ttl;
    private String tokenName;

    public JwtProperties() {
    }

    public JwtProperties(String secretKey, long ttl, String tokenName) {
        this.secretKey = secretKey;
        this.ttl = ttl;
        this.tokenName = tokenName;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public long getTtl() {
        return ttl;
    }

    public void setTtl(long ttl) {
        this.ttl = ttl;
    }

    public String getTokenName() {
        return tokenName;
    }

    public void setTokenName(String tokenName) {
        this.tokenName = tokenName;
    }

    @Override
    public String toString() {
        return "JWTProperties{" +
                "secretKey='" + secretKey + '\'' +
                ", ttl=" + ttl +
                ", tokenName='" + tokenName + '\'' +
                '}';
    }
}
